﻿namespace MicroCloud.Audit.Dtos
{
    /// <summary>
    /// 输出DTO：操作审计信息
    /// </summary>
    [MapFrom(typeof(AuditOperation))]
    public class AuditOperationOutputDto : IOutputDto
    {
        /// <summary>
        /// 获取或设置 编号
        /// </summary>
        public long Id { get; set; }

        /// <summary>
        /// 获取或设置 执行的功能名
        /// </summary>
        public string FunctionName { get; set; }

        /// <summary>
        /// 获取或设置 用户编号
        /// </summary>
        public string UserId { get; set; }

        /// <summary>
        /// 获取或设置 用户名称
        /// </summary>
        public string UserName { get; set; }

        /// <summary>
        /// 获取或设置 用户昵称
        /// </summary>
        public string UserNickname { get; set; }
     
        /// <summary>
        /// 获取或设置 访问IP
        /// </summary>
        public string Ip { get; set; }

        /// <summary>
        /// 获取或设置 操作系统
        /// </summary>
        public string OperationSystem { get; set; }

        /// <summary>
        /// 获取或设置 浏览器
        /// </summary>
        public string Browser { get; set; }
 
        /// <summary>
        /// 获取或设置 HTTP请求方法
        /// </summary>
        public string Method { get; set; }

        /// <summary>
        /// 获取或设置 HTTP请求内容类型
        /// </summary>
        public string ContentType { get; set; }

        /// <summary>
        /// 获取或设置 HTTP请求查询字符串
        /// </summary>
        public string QueryString { get; set; }

        /// <summary>
        /// 获取或设置 HTTP请求参数
        /// </summary>
        public string Arguments { get; set; }
 
        /// <summary>
        /// 获取或设置 操作结果
        /// </summary>
        public AjaxResultType ResultType { get; set; } = AjaxResultType.Success;

        /// <summary>
        /// 获取或设置 消息
        /// </summary>
        public string Message { get; set; }

        /// <summary>
        /// 获取或设置 结果数据
        /// </summary>
        public string ResultData { get; set; }

        /// <summary>
        /// 获取或设置 执行耗时，单位毫秒
        /// </summary>
        public int Elapsed { get; set; }

        /// <summary>
        /// 获取或设置 信息添加时间
        /// </summary>
        public DateTime CreatedTime { get; set; }

    }
 }